import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/public/views/public_tabBar_scrollView.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import 'cabinet_form_bottom_month/view.dart';
import 'cabinet_form_bottom_custom/view.dart';

class CabinetFormBottom extends StatelessWidget {
  final Function(String start, String end)? monthResult;
  final Function(String start, String end)? customResult;
  const CabinetFormBottom({
    super.key,
    this.monthResult,
    this.customResult,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 500,
      color: MGColors.whileColor,
      child: Column(
        children: [
          Padding(
            padding: EdgeInsets.only(left: 30, right: 30, top: 20, bottom: 10),
            child: Stack(
              children: [
                Container(
                  width: double.infinity,
                  child: Text(
                    "选择时间",
                    textAlign: TextAlign.center,
                    style: TextStyle(
                      color: MGColors.text1Color,
                      fontSize: MGFont.titleFont4,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ),
                InkWell(
                  child: Container(
                    width: 30,
                    child: Image.asset(MGImage.image("cabinet_delete", type: ImagePathType.cabinet), width: 15),
                  ),
                  onTap: () {
                    Get.back();
                  },
                )
              ],
              alignment: Alignment.centerRight,
            ),
          ),
          Expanded(
              child: HLTabBarScrollView(
            mens: ["月份选择", "自定义时间"],
            children: [
              CabinetFormBottomMonthPage(
                result: monthResult,
              ),
              CabinetFromBottomCustomPage(
                result: customResult,
              )
            ],
          ))
        ],
      ),
    );
  }
}
